home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / QuickDraw 3D / Samples / SampleCode / BoxPaint+ - non stereo / headers / BoxPaint_cursor3d.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-14  |  2.2 KB  |  80 lines  |  [TEXT/CWIE]

  1. /******************************************************************************
  2.  **                                                                             **
  3.  **     Module:        BoxPaint_cursor3d.h                                         **
  4.  **                                                                          **
  5.  **                                                                          **
  6.  **     Purpose:     To implement a 3D cursor object                             **
  7.  **                                                                          **
  8.  **                                                                          **
  9.  **     Author:        Michael Bishop                                             **
  10.  **                                                                          **
  11.  **     Copyright (C) 1996-1997 Apple Computer, Inc.  All rights reserved.     **
  12.  **                                                                          **
  13.  **                                                                          **
  14.  *****************************************************************************/
  15.  
  16. #ifndef _BP_CURSOR3D_H_
  17. #define _BP_CURSOR3D_H_
  18.  
  19. #include    "QD3D.h"
  20. #include    "QD3DCamera.h"
  21.  
  22. /******************************************************************************
  23.  **                                                                             **
  24.  **                                    Structures                                 **
  25.  **                                                                             **
  26.  *****************************************************************************/
  27.  
  28. /*
  29. **    NOTE: Before you pass this into the _SetPlacement function, make sure your
  30. **    vectors are normalized and orthogonal
  31. */
  32.     
  33. typedef    struct    _cursor3dPlacement    {
  34.     TQ3Point3D    cursorLocation;        /*    The center of the cursor    */
  35.     TQ3Vector3D    toward;                /*    what the cursor is aiming at    */
  36.     TQ3Vector3D    up;                    /*    the up vector    */
  37. }    Cursor3DPlacement;
  38.  
  39.  
  40. typedef struct _cursor3d Cursor3D, *Cursor3DPtr, **Cursor3DHdl;
  41.  
  42.  
  43. /******************************************************************************
  44.  **                                                                             **
  45.  **                                PUBLIC FUNCTIONS                             **
  46.  **                                                                             **
  47.  *****************************************************************************/
  48.  
  49. Cursor3DHdl    Cursor3D_New(
  50.     TQ3GroupObject    theModel);
  51.     
  52. TQ3Status    Cursor3D_Dispose(
  53.     Cursor3DHdl                );
  54.  
  55. void    Cursor3D_Show(
  56.     Cursor3DHdl        theCursor);
  57.     
  58. void    Cursor3D_Hide(
  59.     Cursor3DHdl        theCursor);
  60.  
  61. TQ3Status    Cursor3D_SetPlacement(
  62.     Cursor3DHdl            theCursor3D,
  63.     Cursor3DPlacement    *theCursor3DPlacement) ;
  64.  
  65. TQ3Status    Cursor3D_Submit(
  66.     Cursor3DPtr            theCursor3D,
  67.     TQ3ViewObject        theView) ;
  68.  
  69. /*
  70. **    Scales the cursor to a percentage with respect to a group
  71. */
  72. TQ3Status    Cursor3D_ChangeSizeAgainstGroup(
  73.     Cursor3DHdl                theCursor3D,
  74.     TQ3DisplayGroupObject    theModel,
  75.     TQ3ViewObject            theView, 
  76.     float                    theScale);
  77.  
  78.  
  79. #endif
  80.